package net.ubinow.mflex.data;

public interface IDataItem {
    
    /**
     * returns the asset id of the data item (server side) (record id)
     * @return <schema>:<id> - db record identifier
     */
    public String getAssetID();
    
    /**
     * returns a simple string element repersenting the item
     * @return e.g. <name>
     */
    public String getText();
    
    /**
     * used to set the thin value (useful for simple data objects where we are using the simple data item
     * to repersent a string
     * @param val
     */
    public void setText( String val );
    
    /**
     * pass in the field/property name to fetch it - mock-up of the functionality offered in reflection
     * @return e.g. <name>\n <description>
     */
    public String getText( String field ); 
    
    /** 
     * generic flag property of the IDataItem class - used mainly to set/get if the item is selected or flagged
     * to do some action 
     **/ 
    public boolean getFlag();
    
    public void setFlag( boolean flag ); 
    
    // **************** IComparable Interface ******************** //
    // These interface methods have been extracted from the IComparable
    // to reduce the amounts of classes used
    public boolean equals( Object o );
    public int compareTo( Object o );
}

